#ifndef __CComponent_H__
#define __CComponent_H__

#include "compfwk/IComponent.h"

namespace compfwk
{
    /**
     * \brief Basic implementation of a component.
     *
     * This class is intended to be reused by 
     * inheritance or composition by the CComponent subclasses.
     * It only accomplished the task to ensure that each type
     * of component can be queried about the id of its entity.
     */
    class CComponent : public IComponent
    {
    protected:
        //! Default constructor. 
        //! Establish the entity id passed as argument.
        CComponent( int a_eid );

        //! Copy constructor
        CComponent( const CComponent& ar_comp );

        //! Assignment operator
        CComponent& operator=( const CComponent& ar_comp );

        //! Virtual destructor
        virtual ~CComponent( );

    private:
        //! id of the entity this component belongs to
        int m_eid;
    };
}
#endif